package top.lshaci.learning.alibaba.cloud.seata.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * AccountFeign
 *
 * @author lshaci
 * @since 1.0.0
 */
@FeignClient(value = "account", path = "account")
public interface AccountFeign {

    /**
     * 从用户账户中借出
     *
     * @param userId 账号ID
     * @param money  金额
     */
    @GetMapping("/debit/{userId}/{money}")
    void debit(@PathVariable("userId") String userId, @PathVariable("money") int money);
}
